<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // ceil 向上取整 floor 向下取整 round 四舍五入

    export default class FormatNumber {
        static handle(data, rules, callback) {
            if (typeof data === 'string') {

            } else if (Array.isArray(data)) {
                data.map((item) => {
                    FormatNumber.format(item, rules);
                });
            }
            callback(data);
        }

        static format(data, rules) {
            // cosnt;
            // rule =
        }

        sceneHandle() {

        }
    }

    FormatNumber.handle(
        [{ price1: 1200.0345, price2: 45.1, number: 3.999 }],
        [{ field: 'price', scene: 'PRICE_UPPER_2' }],
        (TData) => {
            //    二次加工
            TData;
        });
</script>
</body>
</html>
